package com.seawaterbt.ssm.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.seawaterbt.ssm.config.DataSource;
import com.seawaterbt.ssm.config.DataSourceEnum;
import com.seawaterbt.ssm.entity.CzBasBoiler;
import com.seawaterbt.ssm.entity.CzBasCrew;
import com.seawaterbt.ssm.entity.CzBasHeatsourceExit;
import com.seawaterbt.ssm.entity.CzDatCrewData;
import com.seawaterbt.ssm.mapper.CzBasHeatsourceExitMapper;
import com.seawaterbt.ssm.service.CzBasHeatsourceExitService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zhf
 * @since 2019-10-31
 */
@Service
public class CzBasHeatsourceExitServiceImpl extends ServiceImpl<CzBasHeatsourceExitMapper, CzBasHeatsourceExit> implements CzBasHeatsourceExitService {

    @DataSource(DataSourceEnum.DB2)
    @Override
    public CzBasHeatsourceExit listOne(String code) {
        QueryWrapper queryWrapper = new QueryWrapper();
        queryWrapper.eq("code",code);
        return this.getOne(queryWrapper);
    }
    @DataSource(DataSourceEnum.DB2)
    @Override
    public CzBasHeatsourceExit GetOneByProviencecode(String provinceCode) {
        QueryWrapper wrapper = new QueryWrapper();
        wrapper.eq("code_province",provinceCode);
        return this.getOne(wrapper);
    }

    @DataSource(DataSourceEnum.DB2)
    @Override
    public List<CzBasHeatsourceExit> list(Wrapper<CzBasHeatsourceExit> queryWrapper) {
        return super.list(queryWrapper);
    }
}
